﻿using ProtoBuf;

namespace Hotfix
{

    /// <summary>
    /// 请求消息
    /// </summary>
    [ProtoInclude((int)Opcode.C2S_Login, typeof(Accont))]
    public abstract partial class AMRequest { }

    /// <summary>
    /// 响应消息
    /// </summary>
    [ProtoInclude((int)Opcode.S2C_Login, typeof(AccontResponse))]
    public abstract partial class AMResponse { }

    [MessagerAttribute(Opcode.C2S_Login)]
    [ProtoContract]
    public class Accont : AMRequest
    {
        [ProtoMember(1)]
        public string userName;

        [ProtoMember(2)]
        public string password;
    }

    [MessagerAttribute(Opcode.S2C_Login)]
    [ProtoContract]
    public class AccontResponse : AMResponse
    {
        [ProtoMember(1)]
        public bool isLogin;
    }

}
